<?php
require_once 'class/admin.php';

require_once 'index1.php';



session_start();
if(isset($_SESSION['admin'])){
    $admin = $_SESSION['admin'];
    $admin->showName();
    echo "<br>welcome admin<br>";
    echo "<a href='logout.php?attempt'>Log Out</a>";
    if($admin->getInitial()==0){
       header("refresh:2; url=http://localhost:8080/adminInitial.php"); 
    }
    
}
else{
    echo 'you need to login first';
    header("refresh:2; url=http://localhost:8080");
}
?>




<?php

require_once 'index2.php';
?>
